package es.ats.codington.festival.daos;

import java.sql.Connection;

import javax.servlet.ServletContext;

import es.ats.codington.festival.utils.FERSDataConnection;
/*
import es.ats.codington.festival.interfaces.daos.IEventDAO;
import es.ats.codington.festival.interfaces.daos.IEventSingUpDAO;
import es.ats.codington.festival.interfaces.daos.IPlaceDAO;
import es.ats.codington.festival.interfaces.daos.IVisitorDAO;

//import com.newcodingtoncity.model.interfaces.daos.IIdentifiersDAO;



public class ManagerDAOImp {
	/**
	private Connection connection;
	private ServletContext context;
	public DatabaseHelper databaseHelper;



	public Connection getConnection() {
		return connection;
	}

	public DAOManager(ServletContext context) {	
		//connection  = FERSDataConnection.getConnection();
		connection  = CodingtonConnectToDB.createConnection();
		this.context = context;
		this.databaseHelper = new DatabaseHelper(context);
	}
	public DAOManager() {		
		connection  = CodingtonConnectToDB.createConnectionWithoutDataSource();	
		this.context = null;
		this.databaseHelper = new DatabaseHelper(null);
	}


	public DatabaseHelper getDatabaseHelper() {
		return databaseHelper;
	}
	

	public IEventDAO getEventDAO() {		 	
		return new EventDAO(connection, databaseHelper);				 			
	}		 	


	public IUserDAO getUserDAO() {
		return new UserDAO(connection,databaseHelper);	
	}
	
	public IPlaceDAO getPlaceDAO() {
		return new PlaceDAO(connection, databaseHelper);				
	}


	public IEventSignUpDAO getEventSignUpDAO() {
		return new EventSignUpDAO(connection, databaseHelper);		
	}


	public IIdentifiersDAO getIdentifiersDAO() {
		return new IdentifiersDAO(connection, databaseHelper);		
	}


	public void closeConnectionWithCommit() {
	
			CodingtonConnectToDB.commit(connection);
			CodingtonConnectToDB.closeConnection(connection);
		
	}

	public void closeConnectionWithRollback() {

			CodingtonConnectToDB.rollback(connection);
			CodingtonConnectToDB.closeConnection(connection);
		
	}

*/

//}

